package com.softWang.system.config;

import com.softWang.common.dataPermission.rule.dept.DeptDataPermissionRule;
import com.softWang.common.dataPermission.rule.dept.DeptDataPermissionRuleCustomizer;
import com.softWang.system.po.SystemDepts;
import com.softWang.system.po.SystemUsers;
import org.springframework.stereotype.Component;
@Component
public class SystemDeptDataPermissionRuleCustomizer implements DeptDataPermissionRuleCustomizer {
    @Override
    public void customize(DeptDataPermissionRule rule) {
        //自定义规则
        rule.addDeptColumn(SystemUsers.class,"deptid");
        rule.addUserColumn(SystemUsers.class, "id");

        rule.addDeptColumn(SystemDepts.class, "id");
        rule.addUserColumn(SystemDepts.class, "cuser");
    }
}
